:root{
    --success-color:#2ecc71;
    --error-color:#e74c3c;
}

*{
    margin: 0;
    padding:0;
    box-sizing:border-box;
}
body{
    background-color:#f9f7f7;
    font-family:Arial,Helvetica,sans-serif;
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:100vh;
}
.container{
    background:#fff;
    border-radius:5px;
    box-shadow:0 2px 2px rgba(0,0,0,.3)

}
h2{
    text-align: center;
    margin: 0 0 20px;
}
.form{
    padding:30px 40px;
    width: 400px;
}
.form-control{
    display:flex;
    flex-direction:column;
    margin-bottom:10px;
    /*padding-bottom:20px;*/
    position:relative;

}
.form-control label{
    color: #777;
    margin-bottom: 5px;
}
.form-control input{
  border:2px solid #f0f0f0;
    border-raidus:4px;
    display:block;
    padding:10px;
    font-size:14px;

}
.form-control input:focus{
    border-color:#777;
    outline:none;
}
/*通过class*/
/*验证通过*/
.form-control.success input{
    border-color:var(--success-color);
}
/*验证失败*/
.form-control.error input{
    border-color:var(--error-color);
}

.form button{
    margin-top: 20px;
    cursor:pointer;
    background-color: #3498db;
    border:2px solid #3498db;
    color:#fff;
    width: 100%;
    font-size:16px;
    padding:10px;
}

/*错误提示*/
small{
    color:#e74c3c;
    visibility: hidden;
}
small.show{
    visibility:visible
}
